package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author ming
 * @create 2022/4/26
 * @description:
 */
@FeignClient("gulimall-gateway")
@Service
public interface ProductFeignService {
    /**
     * feign远程调用可以给网关发送请求
     * 也也可直接给微服务发送请求不用加api, product/skuinfo/info/{skuId} @FeignClient("gulimall-product")
     * @param skuId
     * @return
     */
    @RequestMapping("/api/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
